]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
remoteSearch: fix fallout from RemoteSearchProvider refactor
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 28 Jan 2013 17:04:59 +0000 (12:04 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 28 Jan 2013 17:34:19 +0000 (12:34 -0500)
RemoteSearchProvider.title was removed, but we were still using it in a
few places.

https://bugzilla.gnome.org/show_bug.cgi?id=692723

js/ui/remoteSearch.js

index 761d3153eb7cdf5db16bfd854f700e6bc4ae8a81..96bf81bfea59e15083cbecc52a714989a0745aa5 100644 (file)
@@ -137,8 +137,12 @@ function remoteProvidersLoaded(loadState) {
             idxB = sortOrder.indexOf(appIdB);
 
             // if no provider is found in the order, use alphabetical order
-            if ((idxA == -1) && (idxB == -1))
-                return GLib.utf8_collate(providerA.title, providerB.title);
+            if ((idxA == -1) && (idxB == -1)) {
+                let nameA = providerA.appInfo.get_name();
+                let nameB = providerB.appInfo.get_name();
+
+                return GLib.utf8_collate(nameA, nameB);
+            }
 
             if (numSorted > 1) {
                 // if providerA is the last, it goes after everything
@@ -217,7 +221,7 @@ const RemoteSearchProvider = new Lang.Class({
                                                  Lang.bind(this, this._getResultsFinished),
                                                  this._cancellable);
         } catch(e) {
-            log('Error calling GetInitialResultSet for provider %s: %s'.format( this.title, e.toString()));
+            log('Error calling GetInitialResultSet for provider %s: %s'.format(this.id, e.toString()));
             this.searchSystem.pushResults(this, []);
         }
     },
@@ -230,7 +234,7 @@ const RemoteSearchProvider = new Lang.Class({
                                                    Lang.bind(this, this._getResultsFinished),
                                                    this._cancellable);
         } catch(e) {
-            log('Error calling GetSubsearchResultSet for provider %s: %s'.format(this.title, e.toString()));
+            log('Error calling GetSubsearchResultSet for provider %s: %s'.format(this.id, e.toString()));
             this.searchSystem.pushResults(this, []);
         }
     },
@@ -261,7 +265,7 @@ const RemoteSearchProvider = new Lang.Class({
                                             Lang.bind(this, this._getResultMetasFinished, callback),
                                             this._cancellable);
         } catch(e) {
-            log('Error calling GetResultMetas for provider %s: %s'.format(this.title, e.toString()));
+            log('Error calling GetResultMetas for provider %s: %s'.format(this.id, e.toString()));
             callback([]);
         }
     },